from bs4 import BeautifulSoup

from 查找没用的图片 import listDir,isInfile
allSouces = listDir("/Users/wsg/Workplace/zwt-app-h5/src/views",["vue"],[])
count = 0
keys = set()
for x in allSouces:
    with open(x) as f:
        soup = BeautifulSoup(f.read(),features="html.parser")
        for vanimage in soup.find_all("van-icon"):
            if "size" in vanimage.attrs.keys():
                print(x,vanimage)
            keys = set.union(keys,vanimage.attrs.keys())
            count = count + 1
print(keys,count)